home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 4 #11
/
Commodore_Disk_User_Vol.4_11_1991_-.d64
/
further than 255
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
577b
|
18 lines
1 print"[147]this program will convert any integer"
2 print"number in base ten (denary) into the"
3 print"equivalent number in hexadecimal"
4 print"you may find it interesting that the"
5 print"only restriction concerning the value's"
6 print"magnitude is the computer's arithmetic"
7 print"abilities in denary."
8 print"so please enter any number that you"
9 print"want converted!":print:print
10 input d: z=d
20 h$=""
30 if d then a=int(d/16):h$=mid$("0123456789abcdef",1+(d-a*16),1)+h$:d=a:goto30
40 print"dec: "int(z)
50 print"hex: $"h$
60 print"press any key to run this routine again"
70 get a$: if a$="" then 70
80 run